<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="${mapperImport}">

    <#if resultMaps?? && resultMaps?size > 0>
        <#list resultMaps as resultMap>
            <!-- 通用查询映射结果 -->
            <resultMap id="BaseResultMap"
                       type="<#if resultMap.entityImport??>${resultMap.entityImport}<#else>${entityImport}</#if>">
                <#list resultMap.params as param>
                    <#if param.isId>
                        <id column="${param.dbField}" property="${param.entityField}"/>
                    <#else>
                        <result column="${param.dbField}" property="${param.entityField}"/>
                    </#if>
                </#list>
            </resultMap>
        </#list>
    </#if>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        ${fieldStr}
    </sql>

</mapper>
